
import PropTypes from 'prop-types'
import React,{ memo }  from 'react';
import { LongforWrapper } from '@/views/home/c-cpns/home-longfor/style'
import SectionHeader from '@/components/section-header'
import ScrollView from '@/base-ui/scroll-view'
import LongForItem from '@/components/longfor-item'

const HomeLongFor = memo((props) => {
  const {infoData} = props
    return (
        <LongforWrapper>
            <SectionHeader title={infoData.title} subtitle={infoData.subtitle}></SectionHeader>
          <div className="longfor-list">
            <ScrollView>
              {
                infoData.list.map((item,index)=>{
                  return <LongForItem itemData={item} key={index}></LongForItem>
                })
              }
            </ScrollView>
          </div>
        </LongforWrapper>
    );
});

HomeLongFor.propTypes = {
  infoData:PropTypes.object
}
export default HomeLongFor;
